package com.train.controller;

import com.train.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc:用户控制层 只做转发，不写逻辑业务
 * @author 王佳驹
 * @date 2025/05/12
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {
    private final UserService service;

    /**
     * @param phone 手机号
     * @param password 密码
     * @Desc 用户登录
     * @author wjj
     * @date 2025/05/12
     * @return {@link String }
     */
    @PostMapping("/login")
    public String login(String phone, String password) {
        return service.login(phone,password);
    }
}
